/**
 * Copyright (C) 2013-2014 the original author or authors.
 */
package com.foreveross.bsl.common.utils.context;

/**
 * @description： TODO 怎么能保证web中间件都能分配同一个线程给客户端？ 难道是坑吗？ 注释添加 by heyaowen
 * 
 * 考虑用session取代它
 * 
 * @author rening
 * @version v1.0
 *
 * @2013-3-6
 *
 */
public class ContextThead {
	
	private static ThreadLocal<String> threadVar = new ThreadLocal<String>();
	
	private static ThreadLocal<String> threadSessionKey = new ThreadLocal<String>();
	
	private static ThreadLocal<Class> threadClass = new ThreadLocal<Class>();
	
	public static void setThreadVar(String var){
		threadVar.set(var);
	}
	
	public static String getThreadVar(){
		return threadVar.get();
	}

	public static Class getThreadClass(){
		return threadClass.get();
	}
	
	public static void setThreadClasss(Class clazz){
		threadClass.set(clazz);
	}
	
	public static String getThreadSessionKey(){
		return threadSessionKey.get();
	}
	
	public static void setThreadSessionKey(String clazz){
		threadSessionKey.set(clazz);
	}
}
